<%--
  Created by IntelliJ IDEA.
  User: 王宇航
  Date: 2023/3/8
  Time: 11:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Home-index</title>
</head>
<body>
<%
  String username = (String) session.getAttribute("username");
  if (username == null ){
    session.setAttribute("message","Sign in first!");
    response.sendRedirect("index.jsp");
  }
  out.println("<h1 style = \"color:green\">"+"Your UserName : "+session.getAttribute("username")+"</h1>");
  out.println(session.getId());
%>
<a href="/user?action=signout">Sign Out</a>
</body>
</html>
